package com.zzy.cglib.bean;

import java.math.BigInteger;

public class BigIntConverter implements net.sf.cglib.core.Converter {  

  

    @SuppressWarnings({ "rawtypes", "unchecked" })
	@Override  

    public Object convert(Object value, Class target, Object context) {  


        System.out.println(target); // to类中的定义的参数对象  

        System.out.println(context.getClass() + " " + context); // String对象,具体的方法名  

        if (target.isAssignableFrom(BigInteger.class)) {  

            return new BigInteger(value.toString());  

        } else {  

            return value;  

        }  

    }  

  

}  